#include "keyexchange_response.h"
#include "login_server.h"
#include "i_package_handler.h"

void KeyExchangeResponse::handle(boost::shared_ptr<IIoHandler> ioHandler)
{
	auto packageHandler = boost::shared_dynamic_cast<IPackageHandler, IIoAttachment>(
		ioHandler->getAttachment());
	if(!packageHandler)
	{
		ioHandler->close();
		return;
	}
	packageHandler->handle(this, ioHandler);
}